package com.lovo.homework7_7;

import java.util.Scanner;

public class CamelCaseToSnakeCase {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入驼峰命名的名字");
        String str = scan.next();
        char[] chars = str.toCharArray();
        String strs = "";
        for (int i = 0; i < chars.length; i++) {
            if (chars[i]<'a'){
                chars[i]+=32;
                strs+="_"+chars[i];
            }else {
                strs+=chars[i];
            }
        }
        System.out.println(strs);
    }
}
